fib := method(
    n,
    a := 0
    b := 1
    i := 1
    while(i < n,
        tmp := a
        a = b
        b = tmp + b
        i = i+1)
    b println
)
fib(7)